//
//  Thanatos_AppDelegate.h
//  Thanatos
//
//  Created by Joel Owens on 3/27/10.
//  Copyright Na'Shenassi.org 2010 . All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ThCharacterBrowserPanelController.h"
#import "IKImageBrowserViewArrayController.h"

@interface Thanatos_AppDelegate : NSObject 
{
    NSWindow *window;
    
    NSPersistentStoreCoordinator *persistentStoreCoordinator;
    NSManagedObjectModel *managedObjectModel;
    NSManagedObjectContext *managedObjectContext;
  
  
  
  ///////////////My Code
  NSUserDefaults *userDefaults;
  
  ThCharacterBrowserPanelController *characterBrowserController;
  IBOutlet IKImageBrowserViewArrayController *arrayControllerForCharacterBrowser;
  IBOutlet NSArrayController *arrayControllerForPlayers;
  NSWindowController *playersPanelController;
  
  NSMutableDictionary *openCharacters;
  
  
  NSSortDescriptor *sortDescriptorForCharacters;
  NSSortDescriptor *sortDescriptorForPlayers;
  
}

@property (nonatomic, retain) IBOutlet NSWindow *window;

@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;


- (IBAction)saveAction:sender;


///////////////////////////////////
//////////////////////////////////
/////////////////////////////////


// My code below here


@property (nonatomic, retain) IBOutlet IKImageBrowserViewArrayController *arrayControllerForCharacterBrowser;
@property (nonatomic, retain) IBOutlet NSArrayController *arrayControllerForPlayers;
@property (nonatomic, retain) NSSortDescriptor *sortDescriptorForCharacters;
@property (nonatomic, retain) NSSortDescriptor *sortDescriptorForPlayers;



- (IBAction)newCharacter:(id)sender;
- (IBAction)deleteCharacter:(id)sender;
- (IBAction)openCharacter:(id)sender;
- (IBAction)showCharacterBrowserPanel:(id)sender;
- (IBAction)toggleCharacterBrowserPanel:(id)sender;
- (void)closingWindow:(NSURL *)characterURIRepresentation;
- (void)openCharacterByURL:(NSURL *)characterURL;
- (IBAction)newPlayer:(id)sender;
- (IBAction)deletePlayer:(id)sender;
- (IBAction)showPlayersWindow:(id)sender;

@end
